#include<stdio.h>
int main()
{
	int s,v,h,m,t;
	scanf("%d %d",&s,&v);
	t=s/v+10;
	if(t>=60)
	{
		h=t/60;
		m=t%60;
	}
	printf("0%d:%2.0d",8-h,60-m);
    return 0;
}

